//
//  a.m
//  ClockIn_v2
//
//  Created by Tomy on 13/11/2020.
//

#import "LoadedTableViewCell.h"
#import "Masonry.h"

@interface LoadedTableViewCell() {
    UITextView *record;
}

@end

@implementation LoadedTableViewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        record = [UITextView new];
        record.editable = NO;
        record.layer.cornerRadius = 7;
        //NSString *fontName = record.font.fontName;
        record.font = [UIFont fontWithName:record.font.fontName size:16];
        [self addSubview:record];
        UIEdgeInsets padding = UIEdgeInsetsMake(10, 10, 10, 10);
        [record mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self).with.insets(padding);
        }];
    }
    return self;
}

- (void)setupWithDate:(NSString *)date place:(NSString *)place experience:(NSString *)experience {
    record.text = [NSString stringWithFormat:@"日期：%@\n地点：%@\n旅游心得：%@", date, place, experience];
}

@end
